package com.chaochis.wind.service;

import com.chaochis.wind.base_exceptions.serve_exception.DataHasDeleteException;
import com.chaochis.wind.base_exceptions.serve_exception.DataNotActiveException;
import com.chaochis.wind.base_exceptions.serve_exception.DataNotExistException;
import com.chaochis.wind.common_exceptions.not_support_exception.LoginMethodNotSupportException;
import com.chaochis.wind.common_exceptions.other_login_exceptions.UserPasswordErrorException;
import com.chaochis.wind.vo.WindAccount;

public interface WindLoginService {

    /**
     * 执行得登录业务
     * @param windAccount 要登录得账号(仅accountName, accountType, password生效)
     * @return 返回登录成功得token
     * @throws DataHasDeleteException 异常: 账号已被删除
     * @throws DataNotExistException 异常: 账号不存在
     * @throws DataNotActiveException 异常: 账号未激活
     * @throws UserPasswordErrorException 异常: 密码错误，登录失败
     * @throws LoginMethodNotSupportException 异常: 不支持的登录方式
     */
    public String login(WindAccount windAccount) throws DataHasDeleteException, DataNotExistException, DataNotActiveException, UserPasswordErrorException, LoginMethodNotSupportException;


    /**
     * 登出功能
     * @return 是否成功登出
     */
    public Boolean logout();
}
